<template>
  <div id="app">
    <div class="top">
      <span>
        <i></i>
        搜索历史订单
      </span>
    </div>
    <div class="middle">
      <div class="middle1">
        <div class="middle2">
          <div class="lef">沃尔玛-秦淮店</div>
          <div class="righ">已完成</div>
        </div>
        <div class="middle3">11-19 12:28</div>
      </div>
      <div class="middle-tp">
        <div class="middle-tp1">
          <span v-for="(im,index) in womai" :key="index">
              <img  :src="$baseImgUrl+'/uploads/'+im.img" alt>
          </span>
        </div>
        <div class="middle-tp2">
          <span class="jiang1">¥19.48</span>
          <span class="jiang2">共4件</span>
          <span class="jiang3">达达专送</span>
        </div>
      </div>
      <div class="zcgw">
          再次购买
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      womai: []
    };
  },
  created() {
    this.getWomai();
  },
  methods: {
    getWomai() {
      this.$api.getWomai(result => {
        this.womai = result.data.data;
      });
    }
  }
};
</script>
<style lang="scss" scoped>
#app {
  width: 100vw;
  height: 800px;
  background-color: #f6f6f6;
  .middle {
    width: 370px;
    height: 190px;
    // border: 1px solid red;
    background: #fff;
    position: relative;
    .zcgw{
        width: 90px;
        height: 30px;
        font-size: 14px;
        line-height: 30px;
        text-align: center;
        border-radius:20px; 
        border: 1px solid #666;
        position: absolute;
        bottom: 20px;
        right: 8px;
    }
    .middle-tp {
      width: 355px;
      height: 65px;
    //   border: 1px solid red;
      margin-top: 20px;
      position: relative;
      .middle-tp2 {
        width: 90px;
        height: 56px;
        // border: 1px solid red;
        position: absolute;
        right: 0;
        .jiang1 {
          width: 80px;
          height: 17px;
          color: red;
          display: inline-block;
          position: absolute;
          top: 0px;
          right: -20px;
        }
        .jiang2 {
          width: 80px;
          height: 17px;
          font-size: 13px;
          display: inline-block;
          position: absolute;
          top: 18px;
          right: -20px;
        }
        .jiang3 {
          width: 70px;
          height: 14px;
          font-size: 14px;
          text-align: center;
          color: rgb(22, 169, 255);
          display: inline-block;
          position: absolute;
          border: 1px solid rgb(22, 169, 255);
          top: 34px;
          right: 5px;
        }
      }
      .middle-tp1 {
        width: 265px;
        height: 56px;
        // border: 1px solid red;
        position: absolute;
        left: 0;
        span{
            width: 56px;
            height: 56px;
            display: inline-block;
            // border: 1px solid red;
            img{
                width: 56px;
                height: 56px;
                display: inline-block;
            }
        }
      }
    }
    .middle1 {
      width: 355px;
      height: 36px;
    //   border: 1px solid red;
      .middle3 {
        width: 340px;
        height: 16px;
        line-height: 16px;
        font-size: 12px;
        display: inline-block;
        // border: 1px solid red;
        position: relative;
        top: -5px;
        left: 10px;
      }
      .middle2 {
        width: 355px;
        height: 20px;
        // border: 1px solid red;
        position: relative;
        .righ {
          width: 100px;
          height: 20px;
          font-size: 13px;
          position: absolute;
          right: -40px;
        }
        .lef {
          width: 100px;
          height: 20px;
          font-size: 15px;
          position: absolute;
          left: 10px;
        }
      }
    }
  }
  .top {
    width: 370px;
    height: 44px;
    // border: 1px solid red;
    background: #fff;
    span {
      width: 355px;
      height: 30px;
      font-size: 14px;
      border-radius: 20px;
      line-height: 30px;
      text-align: center;
    //   border: 1px solid red;
      display: inline-block;
      margin-left: 5px;
      margin-top: 5px;
      background-color: #f6f6f6;
      i {
        width: 20px;
        height: 20px;
        line-height: 20px;
        vertical-align: middle;
        display: inline-block;
        // border: 1px solid red;
        background: url("/uploads/ssdhz.png");
        background-repeat: no-repeat;
        background-size: 14px auto;
      }
    }
  }
}
</style>
<style lang="scss">
body {
  padding: 0px;
  margin: 0px;
}
</style>